<template>
	<view class="navigation-bar" :style="style">
		<view class="content">
			<view class="title">
				<text>{{title}}</text>
			</view>
			
			<slot name="left"></slot>
		</view>
	</view>
</template>

<script>
	import { getAppInfo } from '@/common/util'
	
	export default {
		name: 'navigation-bar',
		props: ['title'],
		data () {
			return {
				style: ""
            }
		},
		onReady () {
			let info = getAppInfo();
			let height = parseInt(info.navigationBarHeight) + parseInt(info.statusBarHeight);
			this.style = "height: " + height + "px;padding-top: " + info.statusBarHeight + "px"
		},
		onLoad () {
			
		},
		methods: {
			// 城市选择
			onCityChooseClick () {
				uni.navigateTo({
					url: '/pages/common/city-list/city-list'
				})
			}
		}
	}
</script>

<style>

</style>
